import { defineConfig } from 'vite'
import uni from '@dcloudio/vite-plugin-uni'

// https://vitejs.dev/config/
export default defineConfig(async () => {
  const UnoCss = await import('unocss/vite').then(i => i.default)
  
  return {
    plugins: [
      uni(),
      UnoCss()
    ],
    css: {  
      preprocessorOptions: {  
        scss: {  
          // 取消sass废弃API的报警
          silenceDeprecations: ['legacy-js-api', 'color-functions', 'import'],  
        },  
      },  
    }
  }
})
